package com.sunshine.litemusic.fragment.recommend;

import java.util.Arrays;

/**
 * @author sunshine
 * @date 2020/5/29
 */
public class RecommendModel {

    /**
     * 推荐歌曲实体类
     */
    class RecommendBean{

        private int id;

        private String name;

        private String picUrl;

        private SongBean song;

        class SongBean{

            private String name;

            private int id;

            private SingerBean[] artists;

            private AlbumBean albumBean;

            class SingerBean{

                private String name;

                private String id;

                private String picUrl;

                private String imglvUrl;

                public SingerBean(String name, String id, String picUrl, String imglvUrl) {
                    this.name = name;
                    this.id = id;
                    this.picUrl = picUrl;
                    this.imglvUrl = imglvUrl;
                }

                public String getName() {
                    return name;
                }

                public void setName(String name) {
                    this.name = name;
                }

                public String getId() {
                    return id;
                }

                public void setId(String id) {
                    this.id = id;
                }

                public String getPicUrl() {
                    return picUrl;
                }

                public void setPicUrl(String picUrl) {
                    this.picUrl = picUrl;
                }

                public String getImglvUrl() {
                    return imglvUrl;
                }

                public void setImglvUrl(String imglvUrl) {
                    this.imglvUrl = imglvUrl;
                }

                @Override
                public String toString() {
                    return "SingerBean{" +
                            "name='" + name + '\'' +
                            ", id='" + id + '\'' +
                            ", picUrl='" + picUrl + '\'' +
                            ", imglvUrl='" + imglvUrl + '\'' +
                            '}';
                }
            }

            class AlbumBean{

                private String name;

                private int id;

                public AlbumBean(String name, int id) {
                    this.name = name;
                    this.id = id;
                }

                public String getName() {
                    return name;
                }

                public void setName(String name) {
                    this.name = name;
                }

                public int getId() {
                    return id;
                }

                public void setId(int id) {
                    this.id = id;
                }

                @Override
                public String toString() {
                    return "AlbumBean{" +
                            "name='" + name + '\'' +
                            ", id=" + id +
                            '}';
                }
            }

            public SongBean(String name, int id, SingerBean[] artists, AlbumBean albumBean) {
                this.name = name;
                this.id = id;
                this.artists = artists;
                this.albumBean = albumBean;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getArtists() {
                StringBuilder artistsBuilder = new StringBuilder();
                for (SingerBean singerBean : artists){
                    artistsBuilder.append(singerBean.getName()).append(" ");
                }
                return artistsBuilder.toString();
            }

            public void setArtists(SingerBean[] artists) {
                this.artists = artists;
            }

            public AlbumBean getAlbumBean() {
                return albumBean;
            }

            public void setAlbumBean(AlbumBean albumBean) {
                this.albumBean = albumBean;
            }

            @Override
            public String toString() {
                return "SongBean{" +
                        "name='" + name + '\'' +
                        ", id=" + id +
                        ", artists=" + Arrays.toString(artists) +
                        ", albumBean=" + albumBean +
                        '}';
            }
        }

        public RecommendBean(int id, String name, String picUrl, SongBean song) {
            this.id = id;
            this.name = name;
            this.picUrl = picUrl;
            this.song = song;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getPicUrl() {
            return picUrl;
        }

        public void setPicUrl(String picUrl) {
            this.picUrl = picUrl;
        }

        public SongBean getSong() {
            return song;
        }

        public void setSong(SongBean song) {
            this.song = song;
        }

        @Override
        public String toString() {
            return "RecommendBean{" +
                    "id=" + id +
                    ", name='" + name + '\'' +
                    ", picUrl='" + picUrl + '\'' +
                    ", song=" + song +
                    '}';
        }
    }
}
